import request from "@/utils/request";

// 查询结算主表列表
export function listRentClearM(query) {
  return request({
    url: "/rent/rentClearM/list",
    method: "get",
    params: query,
  });
}

// 查询结算主表详细
export function getRentClearM(id) {
  return request({
    url: "/rent/rentClearM/" + id,
    method: "get",
  });
}

// 新增结算主表
export function addRentClearM(data) {
  return request({
    url: "/rent/rentClearM",
    method: "post",
    data: data,
  });
}

// 修改结算主表
export function updateRentClearM(data) {
  return request({
    url: "/rent/rentClearM",
    method: "put",
    data: data,
  });
}

// 删除结算主表
export function delRentClearM(id) {
  return request({
    url: "/rent/rentClearM/" + id,
    method: "delete",
  });
}

// 查询单号
export function getClearDocumentNo() {
  return request({
    url: "/rent/rentClearM/getClearDocumentNo",
    method: "get",
  });
}

// 审核结算单
export function auditRentClearM(data) {
  return request({
    url: "/rent/rentClearM/audit",
    method: "put",
    data: data,
  });
}
